import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
	state:{
		isLoading:false,
		curUser:'',
		complaintCode:'',
		lightRanks:{
			vitalLights:'',
			humanLights:''
		},
		lightRank:'0',
		age:0,
		ageType:'',
		scenes:[],
		vitalSignList:[],
		firstGroups:{
			vitalGroups:'',
			baseInfoGroups:''
			},
		lifeRanks:'',
		disposal:'',
		firstVisit:'',
		baseInfoData:{
			patientID: '',
			patientName: '',
			sex: '',
			ageType: '',
			age: '',
			telephone: '',
			address: ''
		},
		vitalSignData: {
			temperature: '',
			pulse: '',
			breath: '',
			sbp: '',
			dbp: '',
			diseaseTime: '',
			timeUnit: '',
			scene: '',
			growth: '',
			nutrition: '',
			expression: '',
			position: '',
			handlePlace: ''
		},
		symptomPanelData: {
			complaint:{
				complaintName:''
			}
		},
		firstVisitData: {
			diseases:[]
		},
		saveFlag:{
			flag:true,
			type:"SAVE_TEMP"
		},
		recordData:{},
		reSymptomDone:'',
		reFirstDone:'',
		reDisposal:'',
		kaiExam:'',
		kaiDrug:''
	},
	mutations:{
		setCurUser(state,obj){
			state.curUser = obj.curUser;
		},
		setAge(state,obj){
			state.age = obj.age;
		},
		setAgeType(state,obj){
			state.ageType = obj.ageType;
		},
		setVitalLights(state,obj){
			state.lightRanks.vitalLights = obj.vitalLights;
		},
		setHumanLights(state,obj){
			state.lightRanks.humanLights = obj.humanLights;
		},
		setLightRank(state,obj){
			state.lightRank = obj.lightRank;
		},
		setVitalSignList(state,obj){
			state.vitalSignList = obj.vitalSignList;
		},
		setVitalGroups(state,obj){
			state.firstGroups.vitalGroups = obj.vitalGroups;
		},
		setBaseInfoGroups(state,obj){
			state.firstGroups.baseInfoGroups = obj.baseInfoGroups;
		},
		setDisposal(state,obj){
			state.disposal = obj.disposal;
		},
		setKaiExam(state,obj){
			state.kaiExam = obj.kaiExam;
		},
		setKaiDrug(state,obj){
			state.kaiDrug = obj.kaiDrug;
		},
		setBaseInfoData(state,obj){
			state.baseInfoData = obj.BaseInfoData;
		},
		setVitalSignData(state,obj){
			state.vitalSignData = obj.vitalSignData;
		},
		setSymptomPanelData(state,obj){
			state.symptomPanelData = obj.symptomPanelData;
		},
		setFirstVisitData(state,obj){
			state.firstVisitData = obj.firstVisitData;
		},
		setComplaintCode(state,obj){
			state.complaintCode = obj.complaintCode;
		},
		setSaveFlag(state,obj){
			state.saveFlag = obj.saveFlag;
		},
		setRecordData(state,obj){
			state.recordData = obj.recordData;
		},
		setReSymptomDone(state,obj){
			state.reSymptomDone = obj.reSymptomDone;
		},
		setReFirstDone(state,obj){
			state.reFirstDone = obj.reFirstDone;
		},
		setReDisposal(state,obj){
			state.reDisposal = obj.reDisposal;
		},
		setFirstVisit(state,obj){
			state.firstVisit = obj.firstVisit;
		},
		setIsLoading(state,obj){
			state.isLoading = obj.isLoading;
		}
	}
})